<?php
namespace app\shop\validate\store;
use think\Validate;
class Carfilm extends Validate
{
    protected $rule = [
        'category' => 'require',
        'part_name' => 'require',
        'id' => 'require',
        'booking_id'=>'require',
        'store_id'=>'require'
    ];
    protected $message = [
        'id.require' => '缺少参数id',
        'category.require' => '请选择产品类目',
        'part_name.require' => '请输入产品名称',
    ];
    protected $scene = [
        'add' => ['category', 'part_name'],
        'edit' => ['id','category', 'part_name'],
        'del' => ['id'],
        'info'=>['id'],
        'setStore'=>['booking_id','store_id']
    ];
}